package com.yugao.fintech.antelope.auth.model.rqrs.third;

import com.alibaba.fastjson2.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yugao.fintech.antelope.auth.controller.ThirdAuthController;
import com.yugao.fintech.antelope.auth.oauth2.model.RegisteredClient;
import com.yugao.fintech.antelope.base.model.constants.ValidationCons;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;

/**
 * 获取三方用户信息请求
 */
@Data
public class ThirdUserGetReq {
    /**
     * 来自 {@link ThirdAuthController#login(String, String, ThirdLoginReq)} 返回的token
     */
    @ApiModelProperty(value = "访问令牌")
    @NotEmpty(message = ValidationCons.NOT_EMPTY)
    private String accessToken;

    @JSONField(serialize = false)
    @JsonIgnore
    protected RegisteredClient client;


    /**
     * 使用方: 微信小程序
     * 用途: 用户获取手机号
     */
    private String phoneCode;
}
